package com.aiyige.model.request;

import com.aiyige.base.api.ApiManager;

import okhttp3.ResponseBody;
import retrofit2.Call;

/**
 * Created by zhuyakun on 2017/10/24.
 */

public class AllShowRequest {
    long userId;
    int pageNum;
    int pageSize;
    int isShow;

    public AllShowRequest() {
    }

    private AllShowRequest(Builder builder) {
        setUserId(builder.userId);
        setPageNum(builder.pageNum);
        setPageSize(builder.pageSize);
        setIsShow(builder.isShow);
    }

    public static Builder newBuilder() {
        return new Builder();
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public int getPageNum() {
        return pageNum;
    }

    public void setPageNum(int pageNum) {
        this.pageNum = pageNum;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getIsShow() {
        return isShow;
    }

    public void setIsShow(int isShow) {
        this.isShow = isShow;
    }


    public static final class Builder {
        private long userId;
        private int pageNum;
        private int pageSize;
        private int isShow;

        private Builder() {
            userId = 0;
            pageNum = 1;
            pageSize = 15;
            isShow = 1;
        }

        public Builder userId(long userId) {
            this.userId = userId;
            return this;
        }

        public Builder pageNum(int pageNum) {
            this.pageNum = pageNum;
            return this;
        }

        public Builder pageSize(int pageSize) {
            this.pageSize = pageSize;
            return this;
        }

        public Builder isShow(int isShow) {
            this.isShow = isShow;
            return this;
        }

        public Call<ResponseBody> build() {
            return ApiManager.getService().getAllShow(new AllShowRequest(this));
        }
    }
}
